package com.gxa.medical.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.medical.entity.pojo.Supplier;
import com.gxa.medical.mapper.SupplierMapper;
import com.gxa.medical.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service//IOC注解  把当前Service创建一个对象，交给Spring管理

//继承serviceImpl的全部实现
@Transactional(rollbackFor = Throwable.class)
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper,Supplier> implements SupplierService {

//   @Autowired
//    private SupplierMapper supplierMapper;
//


//    @Override
//    public void insertSupplier(Supplier supplier) {
//        supplierMapper.insertSupplier(supplier);
//    }
//
//    @Override
//    public Supplier findSupplierById(Long id) {
//        if(id==null){
//            return null;
//        }
//        return supplierMapper.findSupplierById(id);
//    }
//
//    @Override
//    public List<Supplier> findSupplierAll() {
//        return supplierMapper.findSupplierAll();
//    }
//
//    @Override
//    public void updateSupplier(Supplier supplier) {
//         supplierMapper.updateSupplier(supplier);
//    }
//
//    @Override
//    public void deleteSupplierById(Long id) {
//        if(id==null){
//            return ;
//        }
//        supplierMapper.deleteSupplierById(id);
//    }
}
